//
//  JLXXMinePhotosDataManager.m
//  JLXXListController
//
//  Created by apple on 17/5/16.
//  Copyright © 2017年 cnsuer. All rights reserved.
//

#import "JLXXMinePhotosDataManager.h"
#import "JLXXMinePhoto.h"
@implementation JLXXMinePhotosDataManager{
    NSMutableArray *_photoUrls;
}

-(void)parseServerData:(NSDictionary *)responseObject{

    NSMutableArray *mineProductions = [NSMutableArray array];
    _photoUrls = [NSMutableArray array];
    for (NSDictionary *dic in responseObject[@"data"]) {
        for (NSDictionary *photoUrlDic in dic[@"smeta"]) {
            JLXXMinePhoto *minePhotos = [[JLXXMinePhoto alloc] init];
            minePhotos.upload_date = dic[@"upload_date"];
            minePhotos.type = dic[@"type"];
            minePhotos.ID = dic[@"id"];
            minePhotos.r_url = photoUrlDic[@"r_url"];
            [mineProductions addObject:minePhotos];
            [_photoUrls addObject:photoUrlDic[@"r_url"]];
        }
    }

    [self.responseObject addObjectsFromArray:mineProductions];
}

-(NSArray *)photoUrls{
    return [_photoUrls copy];
}

@end
